#include <iostream>
#include <algorithm>
#include <string>
#include <cstdio>
#include <vector>
#include <stack>
#include <queue>
#include <set>
using namespace std;
class Solution
{
public:
    int search(vector<int> &nums, int target)
    {
        auto i = lower_bound(nums.begin(), nums.end(), target);
        auto j = upper_bound(nums.begin(), nums.end(), target);
        return j - i;
    }
};